#include "SMPPSourceBearerType.hpp"

using namespace smpp::pdu;

SourceBearerType::SourceBearerType(const quint8 nValue):
TLV(TLVtags::TAG_SOURCE_BEARER_TYPE,1),_Value(nValue){}

SourceBearerType::SourceBearerType(
const SourceBearerType &nSourceBearerType):
TLV(nSourceBearerType),_Value(nSourceBearerType.getValue()){}

bool SourceBearerType::operator ==(
	const SourceBearerType &nSourceBearerType) const{
	return (TLV::operator == (nSourceBearerType) && 
			_Value == nSourceBearerType.getValue());
}

bool SourceBearerType::operator !=(
	const SourceBearerType &nSourceBearerType) const{
	return !this->operator == (nSourceBearerType);
}

SourceBearerType &SourceBearerType::operator = (
	const SourceBearerType &nSourceBearerType){
	if(*this == nSourceBearerType)
		return *this;
	TLV::operator = (nSourceBearerType);
	_Value = nSourceBearerType.getValue();
	return *this;
}

void SourceBearerType::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 SourceBearerType::getValue() const{
	return _Value;
}
